import React, { Component } from 'react'
import { Layout } from 'antd';
import { NavLink } from 'react-router-dom'
const { Sider } = Layout;

export default class Home extends Component {
    render() {
        const { routes } = this.props
        return (
            <>
                <div className="home-header">
                    宏烨找房后台管理系统
            </div>
                <Layout>
                    <Sider>
                        <div className="home-a">
                            <p>管理员</p>
                        </div>
                        <div className="homemain">
                            {
                                routes.map((item, index) => item.path ?
                                    <NavLink key={index} to={item.path}>{item.title}</NavLink> : null)
                            }
                        </div>

                    </Sider>
                    <Layout>
                        {
                            this.props.children
                        }
                    </Layout>
                </Layout>
            </>
        )
    }
}
